package cn.tedu.submarine;


import javax.swing.*;

/**
 * 水雷潜艇
 */
public class MineSubmarine extends SeaObject implements EnemyLife{

    public MineSubmarine() {
        super(63, 19);
    }

    @Override
    public void move() {
        x += speed;
    }

    @Override
    public ImageIcon getImage() {
        return Images.minesubm;//返回水雷潜艇的照片
    }


    /* 发射水雷 */
    public Mine shootMine(){
        return new Mine(this.x+this.width,this.y-11);
    }

    @Override
    public int getLife() {
        return 1;//打掉水雷潜艇，得一条命
    }
}
